.foxui-color {
    position: relative;
    line-height: normal;
    display: inline-block;
    box-sizing: border-box;
    height: $--color-size-default;
    width: $--color-size-default;
    border: $--border-width-base $--border-style-base $--color-border-color;
    border-radius: $--color-border-radius;
    font-size: 0;

    &.foxui-size-medium {
        width: $--color-size-medium;
        height: $--color-size-medium;
    }

    &.foxui-size-small {
        width: $--color-size-small;
        height: $--color-size-small;
    }

    &.foxui-size-mini {
        width: $--color-size-mini;
        height: $--color-size-mini;
    }
}

.foxui-color-handle {
    width: 100%;
    height: 100%;

    padding: $--color-padding;
    cursor: pointer;

    i {
        color: $--color-text-secondary;
        @include centeredXY;
        z-index: 1;
    }
}

.foxui-color-show {
    display: inline-block;
    width: calc(100% - #{$--color-padding} * 2);
    height: calc(100% - #{$--color-padding} * 2);
    @include centeredXY;
    z-index: 2;
}

.foxui-color-background {
    display: inline-block;
    width: calc(100% - #{$--color-padding} * 2);
    height: calc(100% - #{$--color-padding} * 2);
    @include centeredXY;
    z-index: 0;
    border: #999 solid 1px;
}

.foxui-color-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    margin: 0;
}

.is-alpha {
    .foxui-color-background {
        background-image: url();
    }
}

.foxui-color-menu {
    @include popper-panel;
}

.foxui-color-menu__inner {
    padding: $--color-padding + 2px;
}

.foxui-color-menu__main-wrapper {
    display: flex;
}

.foxui-color-svpanel {
    width: $--color-svpanel-width;
    height: $--color-svpanel-height;
    position: relative;
}

.foxui-color-svpanel__white {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #fff, transparent);
}

.foxui-color-svpanel__black {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, #000, transparent);
}

.foxui-color-svpanel__cursor {
    position: absolute;
    cursor: pointer;

    span {
        display: inline-block;
        width: 4px;
        height: 4px;
        box-shadow: 0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0, 0, 0, 0.3), 0 0 1px 2px rgba(0, 0, 0, 0.4);
        border-radius: 50%;
        transform: translate(-2px, -2px);
    }
}

.foxui-color-hslider {
    position: relative;
    width: $--color-hslider-width;
    height: $--color-hslider-height;
    margin-left: 6px;
}

.foxui-color-hslider__bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, red 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red);
}

.foxui-color-hslider__thumb,
.foxui-color-aslider__thumb {
    position: absolute;
    box-sizing: border-box;
    left: 0;
    top: 0;
    border-radius: 1px;
    background: #fff;
    border: 1px solid #f0f0f0;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
    z-index: 1;
    cursor: pointer;
}

.foxui-color-hslider__thumb {
    width: 100%;
    height: 4px;
    transform: translateY(-2px);
}

.foxui-color-aslider {
    position: relative;
    width: $--color-aslider-width;
    height: $--color-aslider-height;
    margin-top: 6px;
    background-image: url();
}

.foxui-color-aslider__bar {
    width: 100%;
    height: 100%;
    background-size: auto 100%;
}

.foxui-color-aslider__thumb {
    width: 4px;
    height: 100%;
    transform: translateX(-2px);
}

.foxui-color-bottom__btns {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.foxui-color-botton__input {
    width: 160px;
}
